def is_prime(num):
    if num <= 1:
        return False
    elif num == 2:
        return True
    else:
        for i in range(2,int(num**0.5) + 1):
            if num % i == 0:
                return False
        return True
def prime_factorization(n):
    for i in range(1,int(n**0.5) + 1):
        if n % i == 0 and is_prime(i):
            another_factor = n // i
            if is_prime(another_factor):
                return max(i,another_factor)
            
    return None

number = int(input())
result = prime_factorization(number)
print(result)
            


        
